package work.month06.day28;

import java.io.File;

/**
 * @date 2020/06/28
 * @author 王光浩
 * @introduction 测试 FileSplitter 和 FileCombiner 的书写
 */
public class Test {

	public static void main(String[] args) {

		FileSplitter instanceSp = FileSplitter.getInstance(1001024);
		FileCombiner instanceCo = FileCombiner.getInstance();
		File origin = new File("D:/test1.mp3");
		File destination = new File("D:/spilt");
		// 进行分割
		int value = instanceSp.split(origin, destination);
		System.out.println("一共分成了" + value + "个文件");
		// 进行组合
		File dest = new File("D:/test2.mp3");
		instanceCo.combine(destination, dest);

	}

}
